Add --version to the CLI - #436
Merged
Merged
Conversation
Found by a release rehearsal against the built wheel, not by any test: `orchestrator --version` failed with "No such option. Did you mean '--verbose'?". There was no way to ask an installed copy what version it is, which is the first thing anyone does with a release. Uses click's `package_name` form, which reads the version from installed distribution metadata rather than importing the package. That keeps the CLI hermetic: answering `--version` must not run anything on the credential-discovery path. Both properties are now tested -- the output carries the real version, and a decoy ~/.orchestrator/.env is never read. Verified against the built wheel in a clean venv, through both the `orchestrator` and `py-orc` entry points. Blocking gate 390 -> 392. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Found by a release rehearsal against the built wheel while checking whether the repo is ready for its first tag — not by any test:
There was no way to ask an installed copy what version it is. That is the first thing anyone runs against a release, so it should land before a tag exists.
Implementation note
Uses click's
package_name=form, which reads the version from installed distribution metadata rather than importing the package. That matters here: this repo has a hard-won property that the CLI does not touch provider credentials unless a model is genuinely demanded, and importing the package to read__version__would put an import on that path for no reason.Both properties are tested:
~/.orchestrator/.envis never read while answering--versionVerified
orchestrator --versionorchestrator, version 0.1.0py-orc --versionorchestrator, version 0.1.0PYTHONPATH=src🤖 Generated with Claude Code